require("../../utils/tool");

Component({
    properties: {
        coupon: {
            type: Object
        },
        canUse: {
            type: Boolean,
            value: !1
        },
        couponHistoryId: {
            type: String,
            value: ""
        }
    },
    data: {
        buttonType: 0,
        list: {
            name: 1,
            age: 2
        }
    },
    methods: {
        onTap: function(e) {
            var t = e.currentTarget.dataset.id;
            this.triggerEvent("chooseCoupon", {
                id: t,
                selected: t == this.properties.couponHistoryId
            }, {});
        }
    }
});